package com.zaey.auto.utils;

import java.io.File;
import java.util.Map;

/**
 * @author JohnSoybean
 * @create 2020-05-23 9:20
 * @description 点赞及转发数统计
 */
public class CountUtils {

    public static Integer countLike(String filePath) {
        File file = new File(filePath);
        String fileName = file.getName();
        if (fileName.contains("-")) {
            String[] split = fileName.split("-");
            return Integer.valueOf(split[0]);
        } else {
            String[] split = fileName.split(".");
            return Integer.valueOf(split[0]);
        }
    }

    public static Map<String, Integer> countAll(String dir) {

        return null;

    }

}
